package br.com.bringme.views;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import java.awt.SystemColor;
import javax.swing.JTextPane;
import javax.swing.border.LineBorder;
import java.awt.Color;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JButton;
import javax.swing.ImageIcon;
import javax.swing.DefaultComboBoxModel;
import org.eclipse.wb.swing.FocusTraversalOnArray;
import java.awt.Component;

@SuppressWarnings("serial")
public class CadastrarPedido extends JFrame {

	private JPanel contentPane;
	private JTextField tfPedidoEnderecoDestino;
	private JTextField tfPedidoEnderecoOrigem;
	private JTextField tfPedidoReceptor;
	private JTextField tfPedidoPreco;
	private JTextField tfPontoReferencia;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					CadastrarPedido frame = new CadastrarPedido();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public CadastrarPedido() {
		setResizable(false);
		setTitle("BringMe - Novo Pedido");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 590, 490);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblCInfo = new JLabel("Informa\u00E7\u00F5es do Cliente");
		lblCInfo.setFont(new Font("Century Gothic", Font.PLAIN, 14));
		lblCInfo.setBounds(15, 11, 171, 20);
		contentPane.add(lblCInfo);
		
		JSeparator separatorRight = new JSeparator();
		separatorRight.setForeground(SystemColor.controlShadow);
		separatorRight.setOrientation(SwingConstants.VERTICAL);
		separatorRight.setBounds(572, 20, 2, 90);
		contentPane.add(separatorRight);
		
		JSeparator separatorBottom = new JSeparator();
		separatorBottom.setForeground(SystemColor.controlShadow);
		separatorBottom.setBounds(10, 110, 563, 2);
		contentPane.add(separatorBottom);
		
		JSeparator separatorLeft = new JSeparator();
		separatorLeft.setForeground(SystemColor.controlShadow);
		separatorLeft.setOrientation(SwingConstants.VERTICAL);
		separatorLeft.setBounds(10, 15, 2, 97);
		contentPane.add(separatorLeft);
		
		JSeparator separatorTop = new JSeparator();
		separatorTop.setForeground(SystemColor.controlShadow);
		separatorTop.setBounds(180, 20, 394, 2);
		contentPane.add(separatorTop);
		
		JLabel lblCNome = new JLabel("Nome:");
		lblCNome.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblCNome.setBounds(25, 36, 61, 14);
		contentPane.add(lblCNome);
		
		JLabel lblCEndereco = new JLabel("Endere\u00E7o:");
		lblCEndereco.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblCEndereco.setBounds(25, 61, 61, 14);
		contentPane.add(lblCEndereco);
		
		JLabel lblCTelefone = new JLabel("Telefone:");
		lblCTelefone.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblCTelefone.setBounds(25, 86, 61, 14);
		contentPane.add(lblCTelefone);
		
		JLabel lblClienteNome = new JLabel("");
		lblClienteNome.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblClienteNome.setBounds(96, 37, 466, 14);
		contentPane.add(lblClienteNome);
		
		JLabel lblClienteEndereco = new JLabel("");
		lblClienteEndereco.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblClienteEndereco.setBounds(96, 62, 466, 14);
		contentPane.add(lblClienteEndereco);
		
		JLabel lblClienteTelefone = new JLabel("");
		lblClienteTelefone.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblClienteTelefone.setBounds(96, 87, 466, 14);
		contentPane.add(lblClienteTelefone);
		
		JLabel lblNovoPedido = new JLabel("Novo Pedido");
		lblNovoPedido.setFont(new Font("Century Gothic", Font.PLAIN, 14));
		lblNovoPedido.setBounds(241, 123, 96, 14);
		contentPane.add(lblNovoPedido);
		
		JSeparator separator = new JSeparator();
		separator.setForeground(SystemColor.controlShadow);
		separator.setBounds(10, 144, 564, 2);
		contentPane.add(separator);
		
		JLabel lblPEnderecoDestino = new JLabel("Endere\u00E7o de Destino:");
		lblPEnderecoDestino.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblPEnderecoDestino.setBounds(10, 157, 136, 14);
		contentPane.add(lblPEnderecoDestino);
		
		JLabel lblPEnderecoOrigem = new JLabel("Endere\u00E7o de Origem:");
		lblPEnderecoOrigem.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblPEnderecoOrigem.setBounds(10, 184, 136, 14);
		contentPane.add(lblPEnderecoOrigem);
		
		JLabel lblPTipo = new JLabel("Tipo:");
		lblPTipo.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblPTipo.setBounds(10, 265, 36, 14);
		contentPane.add(lblPTipo);
		
		JLabel lblPreco = new JLabel("Pre\u00E7o:");
		lblPreco.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblPreco.setBounds(408, 265, 49, 14);
		contentPane.add(lblPreco);
		
		JLabel lblPReceptor = new JLabel("Receptor:");
		lblPReceptor.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblPReceptor.setBounds(10, 238, 136, 14);
		contentPane.add(lblPReceptor);
		
		JLabel lblPObservacoes = new JLabel("Observa\u00E7\u00F5es");
		lblPObservacoes.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblPObservacoes.setBounds(10, 302, 86, 14);
		contentPane.add(lblPObservacoes);
		
		JTextPane tpObservacoes = new JTextPane();
		tpObservacoes.setBorder(new LineBorder(new Color(0, 0, 0)));
		tpObservacoes.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		tpObservacoes.setBounds(10, 327, 564, 129);
		contentPane.add(tpObservacoes);
		
		tfPedidoEnderecoDestino = new JTextField();
		tfPedidoEnderecoDestino.setFont(new Font("Century Gothic", Font.PLAIN, 11));
		tfPedidoEnderecoDestino.setBounds(156, 155, 418, 20);
		contentPane.add(tfPedidoEnderecoDestino);
		tfPedidoEnderecoDestino.setColumns(10);
		
		tfPedidoEnderecoOrigem = new JTextField();
		tfPedidoEnderecoOrigem.setFont(new Font("Century Gothic", Font.PLAIN, 11));
		tfPedidoEnderecoOrigem.setBounds(156, 182, 418, 20);
		contentPane.add(tfPedidoEnderecoOrigem);
		tfPedidoEnderecoOrigem.setColumns(10);
		
		JComboBox cbPedidoTipo = new JComboBox();
		cbPedidoTipo.setModel(new DefaultComboBoxModel(new String[] {"Envelope", "Caixa", "Taxi", "Outro"}));
		cbPedidoTipo.setFont(new Font("Century Gothic", Font.PLAIN, 11));
		cbPedidoTipo.setBounds(156, 263, 242, 20);
		contentPane.add(cbPedidoTipo);
		
		tfPedidoReceptor = new JTextField();
		tfPedidoReceptor.setFont(new Font("Century Gothic", Font.PLAIN, 11));
		tfPedidoReceptor.setBounds(156, 236, 418, 20);
		contentPane.add(tfPedidoReceptor);
		tfPedidoReceptor.setColumns(10);
		
		tfPedidoPreco = new JTextField();
		tfPedidoPreco.setFont(new Font("Century Gothic", Font.PLAIN, 11));
		tfPedidoPreco.setBounds(467, 262, 107, 20);
		contentPane.add(tfPedidoPreco);
		tfPedidoPreco.setColumns(10);
		
		JButton btnCadastrar = new JButton("Cadastrar");
		btnCadastrar.setIcon(new ImageIcon(CadastrarPedido.class.getResource("/br/com/bringme/vision/icons/File_add16.png")));
		btnCadastrar.setFont(new Font("Century Gothic", Font.PLAIN, 11));
		btnCadastrar.setBounds(454, 293, 120, 23);
		contentPane.add(btnCadastrar);
		
		JButton btnCancelar = new JButton("Cancelar");
		btnCancelar.setIcon(new ImageIcon(CadastrarPedido.class.getResource("/br/com/bringme/vision/icons/Cancel16.png")));
		btnCancelar.setFont(new Font("Century Gothic", Font.PLAIN, 11));
		btnCancelar.setBounds(324, 293, 120, 23);
		contentPane.add(btnCancelar);
		
		JLabel lblPPontoReferencia = new JLabel("Refer\u00EAncia:");
		lblPPontoReferencia.setFont(new Font("Century Gothic", Font.PLAIN, 12));
		lblPPontoReferencia.setBounds(10, 211, 136, 14);
		contentPane.add(lblPPontoReferencia);
		
		tfPontoReferencia = new JTextField();
		tfPontoReferencia.setFont(new Font("Century Gothic", Font.PLAIN, 11));
		tfPontoReferencia.setColumns(10);
		tfPontoReferencia.setBounds(156, 209, 418, 20);
		contentPane.add(tfPontoReferencia);
		setFocusTraversalPolicy(new FocusTraversalOnArray(new Component[]{tfPedidoEnderecoDestino, tfPedidoEnderecoOrigem, tfPontoReferencia, tfPedidoReceptor, cbPedidoTipo, tfPedidoPreco, btnCadastrar, btnCancelar, tpObservacoes}));
	}
}
